import Vuei18n from 'vue-i18n'
import Vue from 'vue'
import Cookie from 'js-cookie'
Vue.use(Vuei18n)
import currentZH from './zh'
import currentEN from './en'
import elementEN from 'element-ui/lib/locale/lang/en' // 引入饿了么的英文包
import elementZH from 'element-ui/lib/locale/lang/zh-CN' // 引入饿了么的中文包

export default new Vuei18n({
  locale: Cookie.get('language') || 'zh',
  messages: {
    zh: {
      hello: '祝你开心每一天',
      morning: '早安',
      ...currentZH,
      ...elementZH
    },
    en: {
      hello: 'hope you happly day',
      morning: 'Good morning',
      ...currentEN,
      ...elementEN
    }
  }

})
